//
//  ICMOrderProgressItem.m
//  ICrEAM
//
//  Created by FoREVer_SaD on 16/10/27.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "ICMOrderProgressItem.h"

@implementation ICMOrderProgressItem

- (instancetype)initWithFrame:(CGRect)frame icon:(UIImage *)icon text:(NSString *)text{
    if (self = [super initWithFrame:frame]) {
        UIImageView *iconView = [[UIImageView alloc] initWithImage:icon];
        iconView.contentMode = UIViewContentModeScaleAspectFit;
        iconView.frame = CGRectMake(self.centerX-ActualWidth(21), ActualHeight(22), ActualWidth(21), ActualWidth(21));
        
        UILabel *orderLabal = [[UILabel alloc] initWithFrame:CGRectMake(0, iconView.bottomEdge+ActualHeight(22), self.width, ActualHeight(11))];;
        orderLabal.text = text;
        orderLabal.textColor = ContentTextColor_Gray;
        orderLabal.backgroundColor = [UIColor clearColor];
        orderLabal.textAlignment = NSTextAlignmentCenter;
        orderLabal.font = [UIFont systemFontOfSize:ActualHeight(11)];
    }
    return self;
}

+ (instancetype)icmOrderProgressItemWithFrame:(CGRect)frame icon:(UIImage *)icon text:(NSString *)text{
    return [[ICMOrderProgressItem alloc] initWithFrame:frame icon:icon text:text];
}

@end
